﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;

namespace UBCon.Controls
{
    public class DatePicker:Control
    {
        #region Constructors

        static DatePicker() 
        {
            Type ownerType = typeof(DatePicker);
            DatePicker.DefaultStyleKeyProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(ownerType));
        }

        public DatePicker() 
        {
        
        }

        #endregion

        #region Properties

        public bool IsDropDownOpen
        {
            get { return (bool)GetValue(IsDropDownOpenProperty); }
            set { SetValue(IsDropDownOpenProperty, value); }
        }

        // Using a DependencyProperty as the backing store for IsDropDownOpen.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty IsDropDownOpenProperty =
            DependencyProperty.Register("IsDropDownOpen", typeof(bool), typeof(DatePicker),
            new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.Journal | FrameworkPropertyMetadataOptions.BindsTwoWayByDefault));


        /// <summary>
        /// Gets or sets selected DateTime. This is a dependency property.
        /// </summary>
        public DateTime? SelectedDate
        {
            get { return (DateTime)GetValue(SelectedDateProperty); }
            set { SetValue(SelectedDateProperty, value); }
        }

        // Using a DependencyProperty as the backing store for SelectedDate.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty SelectedDateProperty =
            DependencyProperty.Register("SelectedDate", typeof(DateTime), typeof(DatePicker), 
            new FrameworkPropertyMetadata((DateTime?)null));


        /// <summary>
        /// Gets or sets a boolean value which indicates whether DatePickes can be edited or not.
        /// This is a dependency property.
        /// </summary>
        public bool IsEditable
        {
            get { return (bool)GetValue(IsEditableProperty); }
            set { SetValue(IsEditableProperty, value); }
        }

        // Using a DependencyProperty as the backing store for IsEditable.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty IsEditableProperty =
            DependencyProperty.Register("IsEditable", typeof(bool), typeof(DatePicker),
            new FrameworkPropertyMetadata(true, FrameworkPropertyMetadataOptions.Journal | FrameworkPropertyMetadataOptions.BindsTwoWayByDefault));

        
        #endregion

        #region Depenency Property Changed Callbacks
        #endregion

        #region Overrides

        #endregion

        #region public Methods
        #endregion

        #region Internal Methods
        #endregion

        #region Private Methods
        #endregion

        #region Event Handlers
        #endregion

        #region Fields
        #endregion

        #region Events
        #endregion
    }
}
